package io.renren.common.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class YmlConfig {

    /**
     * 模式配置值
     */
    @Value("${spring.profiles.active: false}")
    private String active;

    /**
     * 模式配置值
     */
    @Value("${common.upload-path}")
    private String uploadPath;

    /**
     * 模式配置值
     */
    @Value("${common.template-path}")
    private String templatePath;
    /**
     * 是否是开发模式
     *
     * @return
     */
    public boolean isDevMode() {
        return "dev".equals(active);
    }

    public String getUploadPath() {
        return uploadPath;
    }

    public void setUploadPath(String uploadPath) {
        this.uploadPath = uploadPath;
    }

    public String getTemplatePath() {
        return templatePath;
    }

    public void setTemplatePath(String templatePath) {
        this.templatePath = templatePath;
    }
}
